{extend name="base" /} {block name="body"}
{block name="css"}
	<link rel="stylesheet" href="/public/oem/css/iconfont.css" />
	<link rel="stylesheet" href="/public/oem/css/css.css" />
{/block}
<div class="layui-body">
	<div class="navbar">
		<a><cite>商品管理</cite></a>&nbsp;<span class="layui-box">&gt;</span>
		<a href=""><cite>预定列表</cite></a>
	</div>		
	<!--tab标签-->
	<div class="layui-tab layui-tab-brief">
		<ul class="layui-tab-title">
			<li class="layui-this">预定管理</li>
		</ul>
		<div class="layui-tab-content">
			<form class="layui-form layui-form-pane" action="{:url('beauthome/orders')}" method="get">
				<div class="layui-inline">
					<label class="layui-form-label">关键词</label>
					<div class="layui-input-inline">
						<input type="text" name="keyword" value="{$keyword}" placeholder="请输入关键词" class="layui-input">
					</div>
				</div>
				<div class="layui-inline">
					<select name="ziduan">
						<option value="order_sn" {if $ziduan=='order_sn' }selected{/if}>订单号</option>
						<option value="re_name" {if $ziduan=='re_name' }selected{/if}>预定人</option>
					</select>
				</div>
				<div class="layui-inline">
					<label class="layui-form-label">状态</label>
					<div class="layui-input-inline">
					      <select name="state"   class="layui-input">
					        <option value=""></option>
					        <option value="1">已支付</option>
							<option value="2">已完成</option>
							<option value="3">已关闭</option>
							<option value="0">待付款</option>
					      </select>
					</div>
				</div>
				<div class="layui-inline">
					<label class="layui-form-label">排序</label>
					<div class="layui-input-inline">
						<select name="param">
							<option value="add_time" {if $param=='add_time' }selected{/if}>预定时间</option>
							<option value="balance" {if $param=='balance' }selected{/if}>价格</option>
						</select>
					</div>
				</div>
				<div class="layui-inline">
					<select name="sort">
						<option value="asc" {if $sort=='asc' }selected{/if}>从低到高</option>
						<option value="desc" {if $sort=='desc' }selected{/if}>从高到底</option>
					</select>
				</div>
				<div class="layui-inline">
					<button class="layui-btn">搜索</button>
				</div>
			</form>
			<hr>
			<table class="layui-table layui-form">
				<thead>
					<tr>
						<th>ID</th>
						<th>订单号</th>
						<th>订房名称</th>
						<th>预定人姓名</th>
						<th>预定人数</th>
						<th>价格</th>
						<th>预定类型</th>
						<th>状态</th>
						<th>预定时间</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
					<form id="listForm">
					{foreach name="home_list" item="vo"}
					<tr>
						<td>{$vo.id}</td>
						<td>{$vo.order_sn}</td>
						<td>{$vo.home_name}</td>
						<td>{$vo.re_name}</td>
						<td>{$vo.re_people}</td>
						<td>{$vo.balance}</td>
						<td>
							{if $vo.re_type==0}
							会员
							{else/}
							非会员
							{/if}
						</td>
						<td>
							{if $vo.state == 1}
							已支付
							{elseif $vo.state == 2}
							已完成
							{elseif $vo.state == 3}
							已关闭
							{else}
							待支付
							{/if}
						</td>
						<td>{$vo.re_time}</td>					
						<td>	
							<a href="{:url('beauthome/ordersedit',['id'=>$vo['id']])}" class="layui-btn layui-btn-normal layui-btn-small"><i class="fa fa-edit"></i>操作</a>
						</td>
					</tr>
					{/foreach}
					</form>
				</tbody>
			</table>
			<!--分页-->
			{$home_list->render()}
		</div>
	</div>
</div>
<script>
	// 定义全局JS变量
	var GV = {
		current_controller: "{$controller}/orders"
	};
</script>
{/block}